package com.nursinghome.management.repository;

import com.nursinghome.management.model.Elderly;
import com.nursinghome.management.model.Medication;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface MedicationRepository extends JpaRepository<Medication, Long> {
    List<Medication> findByElderlyAndActiveTrue(Elderly elderly);
}